const Teacher = require('../model/teacher')

/**
 * 导师中间件
 */
module.exports = {
    /**
     * 获取题目类目列表
     */
    getList: (req, res, next) => {
        Teacher.getList().then(results => {
            req.teachers = results
            next()
        }).catch(err => {
            next(err)
        })
    }
}